import request from '@/utils/request'

export function loginByUsername(data) {
  return request({
    url: '/admin-api/auth/paperLogin',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/login/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

// 获取oss上传凭证
export function getOss(data) {
  return request({
    url: '/api/oss/uploadFile',
    method: 'get',
    params: data
  })
}

